using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreData;
using EntityData;
using Helper;
using System.Data;
namespace Services
{

    public partial class VwStudentFeeService
    {
       readonly IVwStudentFeeEntity entity;

       public VwStudentFeeService()
       {
           this.entity = new VwStudentFeeEntity();

       }

       #region Main Method

      

       /// <summary>
       /// Get by ID
       /// </summary>
       /// <param name="_id"></param>
       /// <returns></returns>
       public CoreData.VwStudentFee GetByID(long _id)
       {
           try
           {
               return entity.GetById(_id, Table.VwStudentFee.ToString());
           }
           catch { return null; }
       }

       /// <summary>
       /// Get List
       /// </summary>
       /// <returns></returns>
       public IList<CoreData.VwStudentFee> GetList()
       {
           try
           {
               return entity.GetAll(Table.VwStudentFee.ToString()).ToList();
           }
           catch { return null; }

       }

     

       /// <summary>
       /// Get List with search string
       /// </summary>
       /// <returns></returns>
       public IList<CoreData.VwStudentFee> GetList(string _searchstring)
       {
           //search theo tieu chi nao do         
           try
           {
               return entity.GetBySearchString(_searchstring, Table.VwStudentFee.ToString()).ToList();
           }
           catch { return null; }
       }


     


       #endregion



        #region Other Method

        public DataTable GetListReturnDataTable(string _Search)
       {
           try
           {
               return entity.GetByCusTomSQLReturnDatatable("Select * from VwStudentFee where "+_Search);
           }
           catch
           {
               return new DataTable();
            }

        }
     
        #endregion 
    
    }
         
}
